<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="#" method="post">
            用户名：<input id ="uname" type="text" name="uname"  onmouseout="onmouseout_()"><br/>
            密码：  <input type="password" name="upwd" /><br/>
            学历：<br/>
            <input  type="checkbox" name="uhobbies" value="专科"/>专科<br/>
            <input  type="checkbox" name="uhobbies" value="本科"/>本科<br/>
            自我介绍:<input id ="zwjs"></input>
            <input  type="submit" value="注册" onclick="show()"/><br/>
        </form>
      
</body>
<script type="text/javascript">

//鼠标离开事件   获取文本输入值  判断是否合格
    function onmouseout_(){
        var uname = document.getElementById("uname").value;
        if(uname!="admin"){
            alert("输入错误，请重新输入！")
        }
    }

//鼠标点击提交  获取 自我介绍的值
    function show() {
        var text = document.getElementById("zwjs").value;
        alert(text);
    }
</script>
</html>